﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace Jinndev {

    /// <summary>
    /// 显示移动路径的层级
    /// </summary>
    public class MapPathOverlay : MonoBehaviour {

        void Awake() {
            EventManager.AutoSet(gameObject, CustomEvent.ChangeActiveLayer, OnChangeActiveLayer);
        }

        /// <summary> 激活层级变化事件 </summary>
        private void OnChangeActiveLayer(EventData eventData) {
            bool show = MapEditorUI.Instance.ActiveLayerIndex == MapEditorUI.MAX_LAYER;
            gameObject.SetActive(show);

            // TODO 未实现
        }

    }

}
